/**
 * Project:   dtu.fmes.googleloon
 * File:      SolarPanelModule.java
 * License: 
 *            This file is licensed under GNU General Public License version 3
 *            http://www.gnu.org/licenses/gpl-3.0.txt
 *
 * Copyright:	Bartosz Cichecki [ cichecki.bartosz@gmail.com ]
 * 				Nicolai Sonne [ NicolaiSonne@hotmail.com.com ]
 * Date:      Dec 11, 2013
 */

package dtu.fmes.loon.model.balloon;

/**
 * 
 * @author Bartosz Cichecki, Nicolai Sonne
 */
public class SolarPanelModule {

	private Double dayChargingSpeed;

	private Double nightChargingSpeed;

	private Double weight;

	public SolarPanelModule() {

	}

	public SolarPanelModule(Double dayChargingSpeed, Double nightChargingSpeed, Double weight) {
		super();
		this.dayChargingSpeed = dayChargingSpeed;
		this.nightChargingSpeed = nightChargingSpeed;
		this.weight = weight;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj) {
			return true;
		}
		if (obj == null) {
			return false;
		}
		if (getClass() != obj.getClass()) {
			return false;
		}
		SolarPanelModule other = (SolarPanelModule) obj;
		if (dayChargingSpeed == null) {
			if (other.dayChargingSpeed != null) {
				return false;
			}
		} else if (!dayChargingSpeed.equals(other.dayChargingSpeed)) {
			return false;
		}
		if (nightChargingSpeed == null) {
			if (other.nightChargingSpeed != null) {
				return false;
			}
		} else if (!nightChargingSpeed.equals(other.nightChargingSpeed)) {
			return false;
		}
		if (weight == null) {
			if (other.weight != null) {
				return false;
			}
		} else if (!weight.equals(other.weight)) {
			return false;
		}
		return true;
	}

	public Double getDayChargingSpeed() {
		return dayChargingSpeed;
	}

	public Double getNightChargingSpeed() {
		return nightChargingSpeed;
	}

	public Double getWeight() {
		return weight;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + (dayChargingSpeed == null ? 0 : dayChargingSpeed.hashCode());
		result = prime * result + (nightChargingSpeed == null ? 0 : nightChargingSpeed.hashCode());
		result = prime * result + (weight == null ? 0 : weight.hashCode());
		return result;
	}

	public void setDayChargingSpeed(Double dayChargingSpeed) {
		this.dayChargingSpeed = dayChargingSpeed;
	}

	public void setNightChargingSpeed(Double nightChargingSpeed) {
		this.nightChargingSpeed = nightChargingSpeed;
	}

	public void setWeight(Double weight) {
		this.weight = weight;
	}

	@Override
	public String toString() {
		return "SolarPanelModule [dayChargingSpeed=" + dayChargingSpeed + ", nightChargingSpeed=" + nightChargingSpeed + ", weight="
		        + weight + "]";
	}

}
